Current Location: Home> Function Categories> hypot

hypot

Calculate the oblique length of a straight triangle
Name:hypot
Category:math
Programming Language:php
One-line Description:Calculate the length of the beveled edge of a right triangle.

Definition and usage

hypot() function calculates the length of the oblique side of a straight triangle.

Example

 <?php
echo hypot ( 2 , 3 ) ;
echo hypot ( 3 , 6 ) ;
echo hypot ( 3 , 6 ) ;
echo hypot ( 1 , 3 ) ;
?>

Try it yourself

grammar

 hypot ( x , y )
parameter describe
x Required. The length of the edge x.
y Required. The length of the edge y.

illustrate

hypot() function will calculate the length of the oblique side according to the two straight solution edge lengths x and y of a right triangle. Or the distance from punctuation point (x, y) to the origin. The algorithm of this function is equivalent to sqrt(x*x + y*y).

Similar Functions
Popular Articles